---
title: "Fulltext articles"
author: "Kohei Watanabe"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output: html_document
editor_options: 
  chunk_output_type: console
---

```{r, message=FALSE}
knitr::opts_chunk$set(echo = TRUE, dpi = 150, fig.width = 8.5, fig.height = 3)
```

```{r}
dat <- readRDS("data_fulltext.RDS")
sum(dat$n)
```

```{r}
par(mfrow = c(1, 3), mar = c(4, 4, 4, 2), font.main = 1)

plot(dat$position, dat$country, pch = 1, col = 1, ylim = c(0, 2),
     ylab = "Mean", xlab = "Position (n-th token)", xlim = c(0, 5000),
     main = "Country mention")

plot(dat$position, dat$lss, pch = 1, col = 1, ylim = c(-1, 1),
     ylab = "Mean", xlab = "Position (n-th token)", xlim = c(0, 5000),
     main = "Polarity score")

plot(dat$position, dat$n, col = 1, type = "h",
     ylab = "Count", xlab = "Length (tokens)", xlim = c(0, 5000),
     main = "Length of articles")
```
